<%@ page import="com.apexedu.identity.entity.TSysMenu" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
    List<TSysMenu> mrfw = (List<TSysMenu>) request.getAttribute("mrfw");
    List<TSysMenu> dyfw = (List<TSysMenu>) request.getAttribute("dyfw");
    String type = (String)request.getAttribute("type");
%>
<html>
<head>
    <title>上海工会管理职业学院</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>

<div id="main">
    <jsp:include page="head.jsp"/>
    <div id="content">
        <div id="contentSub" class="contentSub${type}">
            <div id="contentTr1">
                <div id="content1">
                    <div class="contentHead1">
                        <span class="titleSpan">消息提醒</span>
                        <%--<span class="moreSpan" o="msgContent"> 更多 </span>--%>
                    </div>
                    <div class="msgDiv">
                        <div class="listmessage">
                            <c:if test="${dbts>0}">
                                <div class="listmessagedata1"><span class="dbtxA" style="cursor:pointer;">您有<font
                                        style="color:#290e7e; font-weight:bold" href="javascript:;">
                                    &nbsp;${dbts}&nbsp;</font>条待办事宜信息，请及时处理！</span>
                                </div>
                            </c:if>
                        </div>
                    </div>
                    <div class="calDiv">
                        <span class="weekSpan">${weekday}</span>
                        <span class="dateSpan">第&nbsp;${zc}&nbsp;教学周， &nbsp;${year}&nbsp;年&nbsp;${month}&nbsp;月<b>${date}</b>日 </span>
                    </div>
                </div>
                <c:if test="${type=='ls'}">
                    <div id="tzgg" style="width: 634px;">
                        <div class="lbxxtitle">
                            <ul>
                                <li class="select" h="${basePath}/s/uc/mh/l/oa/2?t=">通知公告</li>
                                <li h="${basePath}/s/uc/mh/l/oa/1?t=">新闻动态</li>
                                <li h="${basePath}/s/uc/mh/l/oa/9?t=">规章制度</li>
                                <li h="${basePath}/s/uc/mh/l/oa/6?t=">学习交流</li>
                                <li>流程待办</li>
                            </ul>
                        <span class="turnSpan">
                            <img src="${basePath}/resources/images/left.png" class="prev"> &nbsp;&nbsp;&nbsp;
                            <b class="pageNoB">1</b>&nbsp;&nbsp;/&nbsp;&nbsp;
                            <b class="totalPageNoB">${tzggys}</b>&nbsp;&nbsp;&nbsp;
                            <img src="${basePath}/resources/images/right.png" class="next">&nbsp;&nbsp;&nbsp;
                            <label class="moreLabel" id="moreLabel" style="margin-right: 10px;"> 更多 </label>
				        </span>
                        </div>
                        <div class="lbxxcontent">
                            <ul class="select">
                                <c:forEach items="${tzgg}" var="lbxx">
                                    <li onclick="window.open('${basePath}/s/uc/mh/no/oa/${lbxx.id}')">
                                        <span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}
                                            <c:if test="${lbxx.isnew}">
                                                <img src="${basePath}/resources/images/new.gif"/>
                                            </c:if>
                                        </span>
                                    <span class="lbxxTimeSpan">
                                        <fmt:formatDate value="${lbxx.time}" pattern="yyyy-MM-dd"/>
                                    </span>
                                    </li>
                                </c:forEach>
                            </ul>
                            <ul>
                                <c:forEach items="${xydt}" var="lbxx">
                                    <li onclick="window.open('${basePath}/s/uc/mh/no/oa/${lbxx.id}')">
                                        <span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}
                                            <c:if test="${lbxx.isnew}">
                                                <img src="${basePath}/resources/images/new.gif"/>
                                            </c:if>
                                        </span>
                                    <span class="lbxxTimeSpan"><fmt:formatDate value="${lbxx.time}"
                                                                               pattern="yyyy-MM-dd"/></span>
                                    </li>
                                </c:forEach>
                            </ul>
                            <ul>
                                <c:forEach items="${gzzd}" var="lbxx">
                                    <li onclick="window.open('${basePath}/s/uc/mh/no/oa/${lbxx.id}')">
                                        <span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}
                                            <c:if test="${lbxx.isnew}">
                                                <img src="${basePath}/resources/images/new.gif"/>
                                            </c:if>
                                        </span>
                                    <span class="lbxxTimeSpan">
                                        <fmt:formatDate value="${lbxx.time}" pattern="yyyy-MM-dd"/>
                                    </span>
                                    </li>
                                </c:forEach>
                            </ul>
                            <ul>
                                <c:forEach items="${xxjl}" var="lbxx">
                                    <li onclick="window.open('${basePath}/s/uc/mh/no/oa/${lbxx.id}')">
                                        <span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}
                                            <c:if test="${lbxx.isnew}">
                                                <img src="${basePath}/resources/images/new.gif"/>
                                            </c:if>
                                        </span>
                                    <span class="lbxxTimeSpan"><fmt:formatDate value="${lbxx.time}"
                                                                               pattern="yyyy-MM-dd"/></span>
                                    </li>
                                </c:forEach>
                            </ul>
                            <ul>
                                <c:forEach items="${dbsy}" var="lbxx">
                                    <li onclick="window.open('${basePath}/s/uc/mh/f?q=${lbxx.depart}')">
                                        <span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}</span>
                                    <span class="lbxxTimeSpan"><fmt:formatDate value="${lbxx.time}"
                                                                               pattern="yyyy-MM-dd"/></span>
                                    </li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>
                </c:if>
                <c:if test="${type=='ld'}">
                    <div id="tzgg" class="tzggld">
                        <div class="lbxxtitle">
                            <ul>
                                <li class="select" h="${basePath}/s/uc/mh/l/oa/2?t=">通知公告</li>
                            </ul>
                            <span class="turnSpan">
                                <img src="${basePath}/resources/images/left.png" class="prev"> &nbsp;&nbsp;&nbsp;
                                <b class="pageNoB">1</b>&nbsp;&nbsp;/&nbsp;&nbsp;
                                <b class="totalPageNoB">${tzggys}</b>&nbsp;&nbsp;&nbsp;
                                <img src="${basePath}/resources/images/right.png" class="next">&nbsp;&nbsp;&nbsp;
                                <label class="moreLabel" id="moreLabel" style="margin-right: 10px;"> 更多 </label>
                            </span>
                        </div>
                        <div class="lbxxcontent">
                            <ul class="select">
                                <c:forEach items="${tzgg}" var="lbxx">
                                    <li onclick="window.open('${basePath}/s/uc/mh/no/oa/${lbxx.id}')">
                                        <span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}
                                            <c:if test="${lbxx.isnew}">
                                                <img src="${basePath}/resources/images/new.gif"/>
                                            </c:if>
                                        </span>
                                    <span class="lbxxTimeSpan">
                                        <fmt:formatDate value="${lbxx.time}" pattern="yyyy-MM-dd"/>
                                    </span>
                                    </li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>
                </c:if>
                <c:if test="${type=='xs'}">
                    <div id="xydt" style="width: 634px;">
                        <div class="lbxxtitle">
                            <ul>
                                <li class="select" h="${basePath}/s/uc/mh/l/oa/1?t=">学院动态</li>
                            </ul>
                            <span class="turnSpan">
                                <img src="${basePath}/resources/images/left.png" class="prev"> &nbsp;&nbsp;&nbsp;
                                <b class="pageNoB">1</b>&nbsp;&nbsp;/&nbsp;&nbsp;
                                <b class="totalPageNoB">${xydtys}</b>&nbsp;&nbsp;&nbsp;
                                <img src="${basePath}/resources/images/right.png" class="next">&nbsp;&nbsp;&nbsp;
                                <label class="moreLabel" id="moreLabel" style="margin-right: 10px;"> 更多 </label>
                            </span>
                        </div>
                        <div class="lbxxcontent">
                            <ul class="select">
                                <c:forEach items="${xydt}" var="lbxx">
                                    <li onclick="window.open('${basePath}/s/uc/mh/no/oa/${lbxx.id}')">
                                        <span class="lbxxContentSpan" title="${lbxx.title}">${lbxx.title}
                                            <c:if test="${lbxx.isnew}">
                                                <img src="${basePath}/resources/images/new.gif"/>
                                            </c:if>
                                        </span>
                                    <span class="lbxxTimeSpan">
                                        <fmt:formatDate value="${lbxx.time}" pattern="yyyy-MM-dd"/>
                                    </span>
                                    </li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>
                </c:if>
            </div>
            <div id="contentTr2">
                <div id="tqqk" style="background: url('${basePath}/resources/images/weather/${city.tp}.jpg')">
                    <div id="tqybDiv" isUpdate="${isUpdate}">
                        <span class="weatherSpan">${city.weather}</span>
                        <span class="tempSpan">${city.temp1}~${city.temp2}°C</span>
                    </div>
                </div>
                <div id="mrfw">
                    <% for (int i = 0; i < mrfw.size(); i++) {
                        TSysMenu menu = mrfw.get(i);
                    %>
                    <div class="server" menuid="<%=menu.getMenuid()%>" <%if (i > 3) {%>style="display:none;"<%}%>>
                        <div class="servericon" style="background-color: <%=menu.getBgcolor()%>;"
                             onclick="window.open('<%=menu.getMenupath()%>')"><img
                                src="${basePath}/resources/images/icons/<%=menu.getTb()%>"
                                onerror="this.src='${basePath}/resources/images/icons/icons-01.png'">
                        </div>
                        <div class="servertitle" title="<%=menu.getMenuname()%>" style="color:#FFFFFF;"> <!-- 服务ID -->
                            <a
                                    href="<%=menu.getMenupath()%>" target="_blank"><%=menu.getMenuname()%>
                            </a>
                        </div>
                    </div>
                    <%}%>
                    <c:if test="${userid != 'admin'}">
                        <div class="server serverMore" style="width: 155px;" o="serverContent">
                            <div class="servericon" style="background: #0000FE;">
                                <img src="${basePath}/resources/images/icons/icons-05.png">
                            </div>
                            <div class="servertitle"
                                 style="top: 70px; color: white; font-size: 16px; text-indent: -10px;"> <!-- 服务ID -->
                                <span> 更多 </span>
                            </div>
                        </div>
                    </c:if>
                    <c:if test="${userid == 'admin'}">
                        <div class="server serverAdd" style="width: 155px;">
                            <div class="servericon"><a
                                    href="${basePath}/s/uc/se/i/${mrfwid}" target="_blank">
                                <img src="${basePath}/resources/images/icons/addMore.png"> </a></div>
                            <div class="servertitle">
                                <span class="moreSpan" o="serverContent"> 更多 </span>
                            <span class="addSpan">
                                <a href="${basePath}/s/uc/se/i/${mrfwid}" target="_blank">订阅 </a>
                            </span>
                            </div>
                        </div>
                    </c:if>
                </div>
            </div>
            <div id="contentTr3">
                <c:if test="${type=='ls'}">
                    <div id="contentTr3Left">
                        <div id="yzap" onclick="window.open('${basePath}/s/uc/shgh/yzhy')">一周安排</div>
                        <div id="jskb" o="jskbContent">教师课表</div>
                    </div>
                </c:if>
                <c:if test="${type=='ld'}">
                    <div id="ldyzap" onclick="window.open('${basePath}/s/uc/shgh/yzhy')">一周安排</div>
                </c:if>
                <c:if test="${type=='xs'}">
                    <div id="xskb" o="xskbContent">学生课表</div>
                </c:if>
                <div id="fwdy">
                    <% for (int i = 0; i < dyfw.size(); i++) {
                        TSysMenu menu = dyfw.get(i);
                    %>
                    <div class="server <%if(i<=4){%>serverls<%}%>" menuid="<%=menu.getMenuid()%>" name="<%=menu.getMenuname()%>"
                         pmenuid="000603298" pmenuname="<%=menu.getMenuname()%>" filetype="normal"
                            <%if (("ls".equals(type) && i > 8) || (!"ls".equals(type) && i > 3)) {%>
                         style="display:none;"<%}%>>
                        <div class="servericon" style="background-color: <%=menu.getBgcolor()%>;"
                             onclick="window.open('<%=menu.getMenupath()%>')"><img
                                src="${basePath}/resources/images/icons/<%=menu.getTb()%>"
                                onerror="this.src='${basePath}/resources/images/icons/icons-01.png'">
                        </div>
                        <div class="servertitle" title="<%=menu.getMenuname()%>"> <!-- 服务ID -->
                            <a
                                    href="<%=menu.getMenupath()%>" target="_blank"><%=menu.getMenuname()%>
                            </a></div>
                    </div>
                    <%}%>
                    <div class="server serverAdd" filetype="normal" style="width: 155px;">
                        <div class="servericon">
                            <a href="${basePath}/s/uc/se/i/${dyfwid}" target="_blank">
                                <img src="${basePath}/resources/images/icons/addMore.png">
                            </a>
                        </div>
                        <div class="servertitle">
                            <span class="moreSpan" o="serverContent"> 更多 </span>
                            <span class="addSpan">
                                <a href="${basePath}/s/uc/se/i/${dyfwid}" target="_blank">订阅 </a>
                            </span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="leftMore leftMore${type}" id="msgContent">

            </div>
            <!--教师课表start-->
            <div class="leftMore leftMore${type}" id="jskbContent">
                <div class="titleDiv">
                    <span class="titleSpan">教师课表</span>
                    <span class="moreSpan">more </span>
                </div>
                <div class="contentDiv">
                    <table>
                        <tr>
                            <td width="12%"></td>
                            <td width="12%">周一</td>
                            <td width="12%">周二</td>
                            <td width="12%">周三</td>
                            <td width="12%">周四</td>
                            <td width="12%">周五</td>
                            <td width="12%">周六</td>
                            <td width="12%">周日</td>
                        </tr>
                    </table>
                </div>
                <div class="hiddendiv">
                    <span class="closeSpan"> 关闭</span>
                </div>
                <div class="titleDescDiv"></div>
            </div>
            <!--教师课表end-->
            <!--教师课表start-->
            <div class="leftMore leftMore${type}" id="xskbContent">
                <div class="titleDiv">
                    <span class="titleSpan">学生课表</span>
                    <span class="moreSpan">more </span>
                </div>
                <div class="contentDiv">
                    <table>
                    </table>
                </div>
                <div class="hiddendiv">
                    <span class="closeSpan"> 关闭</span>
                </div>
            </div>
            <!--教师课表end-->
            <div class="rightMore rightMore${type}" id="serverContent">
                <div class="tRDiv">
                    <span class="tRSpan">已订阅服务</span>
                    <span class="cRSpan closeSpan">关闭</span>
                </div>
                <div class="cRDiv">
                </div>
            </div>
        </div>
        <div id="contentBg"></div>
    </div>
    <jsp:include page="foot.jsp"/>
</div>
</body>
</html>
